#include <stdio.h>
#include <stdlib.h>

int main()
{
    double x, y;

    scanf("%lf%lf",&x,&y);
    if(1-x*x-y*y<=1e-3&&1-x*x-y*y>=0)
        printf("Y");
    else
        printf("N");
    return 0;
}
